#ifndef ACTIVATION_H
#define ACTIVATION_H

#include <QWidget>
#include <QFrame>
#include <QString>
#include <QPaintEvent>
#include "activation_thread.h"
#include "activation_thread_kms.h"
#include "systemactivationmainwindow.h"

#undef __PLATFORM_AMD64__
#if defined __x86_64 || defined __x86_64__ || defined __amd64 || defined __amd64__
#define __PLATFORM_AMD64__
#endif

#undef __PLATFORM_I386__
#if defined __i386 || defined __i386__ || defined __i686 || defined __i686__
#define __PLATFORM_I386__
#endif

#undef __PLATFORM_ARM64__
#ifdef __aarch64__
#define __PLATFORM_ARM64__
#endif

#undef __PLATFORM_MIPS64EL__
#ifdef __mips__
#ifdef __LP64__
#define __PLATFORM_MIPS64EL__
#endif
#endif


#if defined __PLATFORM_AMD64__ || defined __PLATFORM_I386__ || defined __PLATFORM_ARM64__ || defined __PLATFORM_MIPS64EL__
#define ENABLE_UKEY
#endif

namespace Ui {
class ActivationWidget;
}
//class SystemDispatcher;

class ActivationWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ActivationWidget(QWidget *parent = 0);
    ~ActivationWidget();
    void init_data();
    void init_ui();
    activation_thread *thread;
    int flag = 0;
    void paintEvent(QPaintEvent *event);
    activation_thread_kms *kms_activation;
    QNetworkAccessManager *m_accessManager_Registered = new QNetworkAccessManager();


signals:
    void mySignal();


public slots:
    void ukey_activation();
    void on_confirm_2_clicked();
    void slot_activation_message(int activation);

private slots:
    void on_confirm_clicked();

    void on_activation_value_textChanged(const QString &arg1);

    void on_activation_value_2_textChanged(const QString &arg1);

    void on_activation_value_3_textChanged(const QString &arg1);

    void on_activation_value_4_textChanged(const QString &arg1);

    void on_activation_value_5_textChanged(const QString &arg1);

    void keyPressEvent(QKeyEvent  *event);

    void on_serial_edit_clicked();

    void on_customer_edit_clicked();

    void displayeinfo(QStringList  *rtnlist);

    void send_activation_info(QString info);
    int finishedSlot_info(QNetworkReply *registered);

        
    void on_qrcodebtn_clicked();

private:
    Ui::ActivationWidget *ui;

//    SystemActivationMainWindow *m_sysActiveMainWindow=nullptr;

//    QStringList serial ;
//    QStringList registration ;
//    QStringList url ;
//    QString activation ;
//    SystemDispatcher *systeminterface;

};

#endif // ACTIVATION_H
